
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
  <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <style>
h1{
    color: red;
    font-size: 33px;
}
    </style>
    <script src="../js/jquery.js"></script>
</head>
<body>
<h1>修改页面</h1>
<form action="${pageContext.request.contextPath}/ServletNC" method="get">
    <table border="3">
<c:forEach items="${list}" var="xjj">
        <tr>
            <td>商品id</td>
            <td><input readonly type="text" name="id" value="${xjj.id}"> </td>
        </tr>
        <tr>
            <td>商品名称</td>
            <td><input type="text" name="name" value="${xjj.name}"> </td>
        </tr>
        <tr>
            <td>商品性别</td>
            <td>
                <select name="select" >
                    <option value="女" ${xjj.sex.equals("女")?"selected":""} >女</option>
                    <option value="妖" ${xjj.sex.equals("妖")?"selected":""} >妖</option>
                    <option value="男" ${xjj.sex.equals("男")?"selected":""} >男</option>
                   <%-- <option value="妖"  selected="<%=xjj.getSex().equals("妖")?"selected":""%>">妖</option>
                    <option value="男" selected="<%=xjj.getSex().equals("男")?"selected":""%>">男</option>--%>
                </select>
            </td>
        </tr>
        <tr>
            <td>商品状态</td>
            <td> 上架<input type="radio" ${xjj.flage==0?"checked":""} name="radio" value="0">
                下架<input type="radio" ${xjj.flage==1?"checked":""} name="radio" value="1">
            </td>
        </tr>
        <tr>
            <td>操作</td>
            <td><input type="hidden" value="update2" name="op">  <input type="submit" value="提交"></td>
        </tr>
</c:forEach>
    </table>



</form>

<script>


</script>
</body>
</html>
